﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MJM.CONCURSO.AD;
using MJM.CONCURSO.EN;

namespace MJM.CONCURSO.CN
{
    public static class GanadorCN
    {
        public static int Insertar(GanadorEN obj)
        {
            obj.FechaSorteo = DateTime.Now.Year.ToString() + (DateTime.Now.Month + 100).ToString().Substring(1, 2) + (DateTime.Now.Day + 100).ToString().Substring(1, 2);
            obj.HoraSorteo = (DateTime.Now.Hour + 100).ToString().Substring(1, 2) + ":" + (DateTime.Now.Minute + 100).ToString().Substring(1, 2); 
            return GanadorAD.Insertar(obj);
        }

        public static List<GanadorEN> Listar(GanadorEN obj)
        {
            return GanadorAD.Listar(obj);
        }
    }
}
